<link rel="stylesheet" href="/css/company/companyList.css">
<div  id="app" v-cloak>
  <div class="main">
    <div class="add-item" @click="editCompany('','')">
      <div>新增企业</div>
      <div class="add-icon"></div>
    </div>
    <div class="company-count">总共<span class="count">{{companyList.length}}</span>家企业</div>
    <div class="company-list" v-if="companyList.length>0 && done">
      <div class="company-item" v-for="(item,index) in companyList" @click="editCompany(item.id,item.name)">
        <div>{{item.name}}</div>
        <div class="icon"></div>
      </div>
    </div>
    <div class="no-data" v-if="!companyList.length && done"></div>
  </div>
  <footer-menu active="index"></footer-menu>
</div>

<script>
  var agentId = '<%- agentId || '' %>';
  var phone = '<%- phone || '' %>';
  window.history.pushState(null,null,window.location.href);
  window.addEventListener('popstate', function(event) {
    window.history.pushState(null,null,window.location.href);
  });
</script>
<script src="/js/company/companyList.js"></script>
<script src="/dependencies/moment.min.js"></script>

